<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2021-11-27
  Time: 21:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <title>登录</title>
    <link  href="${pageContext.request.contextPath}/css/css.css" rel="stylesheet" type="text/css">
    <link  href="${pageContext.request.contextPath}/css/sign.css" rel="stylesheet" type="text/css">
    <script src="${pageContext.request.contextPath}/js/jquery.js"></script>
    <script src="${pageContext.request.contextPath}/js/js.js"></script>
    <script src="${pageContext.request.contextPath}/js/sign.js"></script>
    <style>
        .submit{ margin-left:73px;}
    </style>
    <script>
        $(function(){

            (function()
            {
                var name=/^\s*[\w\.\@\u4e00-\u9fa5]{2,20}\s*$/;
                var pwd=/^\s*[\w]{6,9}\s*$/;
                var ver=/\s*[\w]{5,5}\s*$/;

                /*匹配中文字符的正则表达式： [\u4e00-\u9fa5]
                匹配双字节字符(包括汉字在内)：[^\x00-\xff]*/

                reg($('.text_1'),name);
                reg($('.text_3'),pwd);
                reg($('.style_none'),ver);

                $('.submit').click(function()
                {
                    if(!name.test($('.text_1').val()))
                    {
                        $('.text_1').siblings('.none').slideDown('slow');
                        $('.text_1').siblings('.none').find('i').css('color','red');
                        return false;
                    }
                    if(!pwd.test($('.text_3').val()))
                    {
                        $('.text_3').siblings('.none').slideDown('slow');
                        $('.text_3').siblings('.none').find('i').css('color','red');
                        return false;
                    }
                    if(!ver.test($('.style_none').val()))
                    {
                        $('.style_none').siblings('.none').slideDown('slow');
                        $('.style_none').siblings('.none').find('i').css('color','red');
                        return false;
                    }
                    /*

                    提交表单
                    */
                });
            })();
        });
    </script>
</head>

<body>
<header class="clear">
    <img src="../img/sss.png" >
    <div class="search left">
        <form  action="" method="get">
            <input type="text" value="" placeholder="请输入书名或作者名称">
            <input type="submit" value="搜索">
        </form>
        <p class="left">
            <span>热门推荐：</span>
            <a href="javascript:;">如何买到一本好书</a>
            <a href="javascript:;">三天学完java</a>
            <a href="javascript:;">五天入门</a>
            <a href="javascript:;">七天找到工作</a>
        </p>
    </div>
    <div class="reg">
        <div class="delu" ${sessionScope.loginUser==null?'':'hidden'}>
            <a  href="/user/toLogin">登录</a>
            <span>|</span>
            <a  href="./jsp/register.jsp">注册</a>
        </div>
        <div class="delu2 clear" ${sessionScope.loginUser!=null?'':'hidden'}>
            <div class="self ease">
                <a href="javascript:;" class="clear">我的书城<span class="icon ease"></span></a>
                <div class="clear"></div>
                <ul  class="clear">
                    <li><a href="javascript:;">个人中心</a></li>
                    <li><a href="/car/toCart">我的购物车</a></li>
                    <li><a href="javascript:;">账号设置</a></li>
                    <li><a href="javascript:;">上传文件</a></li>
                    <li><a href="/user/logOut">退出登录</a></li>
                </ul>
            </div>
            <span class="split">|</span>
            <a  href="javascript:;"  title="您有3条未读消息" class="news">消息<b>3</b></a>
        </div>
        <span>|</span>
        <a  href="javascript:;">意见反馈</a>
    </div>
</header>
<!--头部结束-->

<nav class="clear">
    <ul class="nav_1 clear">
        <div class="active"></div>
        <li><a href="../jsp/index.jsp">首页</a></li>
        <li><a href="/index_article">文学</a>
            <ul class="clear">
                <li><a href="javascript:;">现代文学</a></li>
                <li><a href="javascript:;">外国文学</a></li>
                <li><a href="javascript:;">古典文学</a></li>
                <li><a href="javascript:;">散文随笔</a></li>
            </ul>
        </li>
        <li><a href="javascript:;">社会学</a></li>
        <li><a href="javascript:;">心理学</a></li>
        <li><a href="javascript:;">经济学</a></li>
        <li><a href="javascript:;">自然科学</a></li>
        <li><a href="javascript:;">历史</a></li>
        <li><a href="javascript:;">其他</a>
            <ul class="clear">
                <li><a href="javascript:;">旅游攻略</a></li>
                <li><a href="javascript:;">周刊杂志</a></li>
                <li><a href="javascript:;">经典短语</a></li>
            </ul>
        </li>
        <div class="submission">
            <a href="javascript:;"><span class="icon_span"></span>我要投稿</a>
        </div>
    </ul>
</nav><!--导航结束-->

<div class="box">
    <h3>用户登录   <span class="right">还没有账号 点击<a href="../jsp/register.jsp">注册</a></span></h3>

    <div class="menu_3">
        <form  id="user_name" action="/user/login" method="post">
            <p style="color: darkred">${msg}</p>
            <p><span>用户名：</span> <input type="text" name="name" value="" class="text_1" placeholder="用户名/邮箱">
                <br/><span  class="none"> <em>*</em><i>请输入正确的用户名</i></span>
            </p>
            <p><span>密 &nbsp; &nbsp;码：</span> <input type="password" name="pwd"  class="text_3">
                <br/><span  class="none">  <em>*</em><i>请输入正确的密码</i></span>
            </p>
            <p style=" margin-left:70px;"><input  type="checkbox" value="1" name="cookie">两周内免登录 <a href="pass.html">忘记密码</a></p>
            <p><input type="submit"  value="提交"  class="submit"></p>
            <p><span>使用其他帐号直接登录</span>  <a href="javascript:;">腾讯QQ</a> <a href="javascript:;">新浪微博</a></p>
        </form>
    </div>
</div>
<footer class="clear">
    <p>书犹药也，善读之可以医愚。<a href="javascript:;">留言</a></p>
    <p>凡是任何售后问题请自己解决</p>
</footer>
</body>
</html>

